﻿#include <iostream>
#include <list>
using namespace std;

int main() {
    list<int> dq;

    // 模拟双端队列
    dq.push_back(10);
    dq.push_front(5);
    dq.push_back(15);

    cout << "Front: " << dq.front() << endl;  // 5
    cout << "Back : " << dq.back() << endl;   // 15

    dq.pop_front();
    dq.pop_back();

    for (int val : dq) {
        cout << val << " ";
    }
    cout << endl; // 剩余：10

    return 0;
}
